<template>
  <div class="app-container">
    <div class="export_less">
      <el-button type="primary" size="small" @click="handleImport">导入授权License</el-button>
    </div>
    <div class="grid">
      <div class="grid_content">
        <div class="title">
          <p>普通版</p>
          <p>适合小微团队</p>
        </div>
        <div class="info">
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
        </div>
        <div class="bottom">
          <p><span style="font-size: 48px">0</span> 元 / 月</p>
          <div class="btns" @click="payMoney">开始使用</div>
        </div>
      </div>
      <div class="grid_content">
        <div class="title" style="background: rgb(253, 198, 61)">
          <p>尊享版</p>
          <p>适合中型团队</p>
        </div>
        <div class="info">
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
        </div>
        <div class="bottom">
          <p><span style="font-size: 48px">66.66</span> 元 / 月</p>
          <div class="btns" @click="payMoney">开始使用</div>
        </div>
      </div>
      <div class="grid_content">
        <div class="title" style="background: rgb(64, 61, 98)">
          <p>至尊版</p>
          <p>适合大型团队或企业</p>
        </div>
        <div class="info">
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
          <div class="row_index">
            <span class="fl">团队成员</span> <span class="fr">1000人</span>
          </div>
        </div>
        <div class="bottom">
          <p><span style="font-size: 48px">99.88</span> 元 / 月</p>
          <div class="btns" @click="payMoney">付款使用</div>
        </div>
      </div>
    </div>
    <!-- 导入 -->
    <el-dialog
      title="导入授权License"
      :visible.sync="dialogVisible"
      width="750px"
    >
      <el-input
        v-model="textareaValue"
        type="textarea"
        placeholder="请输入内容"
        :rows="4"
      >
      </el-input>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleSum">确 定</el-button>
        <el-button @click="dialogVisible = false">取 消</el-button>
      </span>
    </el-dialog>
    <!-- 购买方案 -->
    <el-dialog
      title="购买方案"
      :visible.sync="dialogPayVisible"
      width="750px"
      class="buy"
    >
      <div class="content">
        <div v-for="(item,index) in dataList" :key="index" class="pay_box" :class="activeIndex ===index ? 'activeColorBox': '' " @click="handleActive(index)">
          <p><span style="color:#E6A23C; font-size:20px">{{ item.value }}</span> 个季度</p>
          <p><span style="color:#F56C6C">￥{{ item.label }}</span> /团队</p>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submit">确 定</el-button>
        <el-button @click="dialogPayVisible = false">取 消</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: 0,
      dialogVisible: false,
      dialogPayVisible: false,
      textareaValue: "",
      moneyValue: "",
      dataList: [{ value: 1, label: 666 }, { value: 2, label: 888 }, { value: 3, label: 1999 }, { value: 4, label: 3888 }]
    };
  },
  methods: {
    handleImport() {
      this.dialogVisible = true;
    },
    handleSum() {
      // QuickAddCustomer(this.temp).then(res => {
      //   this.dialogFormVisible = false;
      //   if (res.code === 200) {
      //     this.dialogVisible = false;
      //     this.$message.success("操作成功");
      //   } else {
      //     this.$message.error("操作失败: " + res.message);
      //   }
      // });
    },
    payMoney() {
      this.dialogPayVisible = true;
    },
    handleActive(index) {
      this.activeIndex = index;
    },
    submit() {

    }
  }
};
</script>

<style lang="scss" scoped>
.export_less{
  padding-left: 124px;
  margin-bottom: 20px;
  .el-button--medium{
   background-color: #623edf
  }
}
.grid {
  display: flex;
  justify-content: space-around;
  padding: 0 124px;
  .grid_content {
    flex: 1;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    border: 1px solid #ddd;
    height: 600px;
    &:nth-child(2) {
      margin: 0 40px;
    }
    .title {
      height: 150px;
      text-align: center;
      padding-top: 40px;
      border-radius: 10px 10px 0 0;
      background-color: #623edf;
      p {
        line-height: 35px;
        margin: 0;
        color: #fff;
        font-size: 28px;
        &:nth-child(2) {
          font-size: 16px;
        }
      }
    }
    .info {
      height: 300px;
      padding: 0 20px;
      color: #88898d;
      font-size: 14px;
      .row_index {
        display: flex;
        justify-content: space-between;
        span {
          padding: 15px 5px;
        }
      }
    }
    .bottom {
      // background: #f99;
      p {
        text-align: center;
        padding: 10px 0;
        margin: 0;
      }
      .btns {
        width: 300px;
        margin: 0 auto;
        text-align: center;
        padding: 10px;
        font-size: 16px;
        border-radius: 5px;
        color: #fff;
        background-color: #623edf;
        cursor: pointer;
      }
    }
  }
}
.content{
  display: flex;
  font-size: 14px;
  justify-content: space-between;
.pay_box{
  width: 140px;
  padding:0 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
}
}
.activeColorBox{
  border: 1px solid #283592 !important;
   background: rgba(40,120,255,0.15);
}
</style>
